<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位</title>
    <style>

        .box{
            width: 150px;
            height: 150px;
            border: 1px solid;
            margin-left: 10px;

            position: relative;
        }

        .up {
            /*可移动的方向：
                left right
                top  bottom
            */
             position: absolute;
             top:30px;
             left: 60px;
             background-color: #00FF00;
        }

        .container{
             position: relative;
             border: 1px solid;
        }

        .box-1 {

              background-color: #0000FF;

              z-index:999;
        }

    </style>
</head>
<body>


<div class="container">
    <div class="box box-1">
        box-1
    </div>

    <div class="box up">
        box-2
    </div>

    <div class="box ">
        box-3
    </div>
</div>

</body>
</html>